package generics.simple;

/**
 * 犬类
 */
public class Dog extends Animal {

    protected final boolean isHappy;

    public Dog() {
        this.isHappy = true;
    }

    public Dog(boolean isHappy) {
        this.isHappy = isHappy;
    }

    public boolean isHappy() {
        return isHappy;
    }

    @Override
    public void eat() {
        System.out.println("我是犬类，我在吃饭");
    }
}
